const { override, fixBabelImports, addWebpackPlugin, disableEsLint } = require("customize-cra");

const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
// const AntdDayjsWebpackPlugin = require("antd-dayjs-webpack-plugin");
module.exports = override(
  // fixBabelImports("import", {
  //   libraryName: "antd",
  //   libraryDirectory: "es",
  //   style: "css",
  // }),
  // disableEsLint(),
  (config) => {
    if (process.env.NODE_ENV == "production") config.plugins = config.plugins.filter((plugin) => plugin.constructor.name !== "ESLintWebpackPlugin");
    return config;
  }
  // addWebpackPlugin(new BundleAnalyzerPlugin())
);
